home *** CD-ROM | disk | FTP | other *** search
/ Apple WWDC 1996 / WWDC96_1996 (CD).toast / Technology Materials / MacOS 8 Resources / Developer Tools / Mac OS 8 Interfaces & Libraries / Interfaces / PInterfaces / ADSPSecure.p < prev    next >
Text File  |  1996-05-01  |  4KB  |  122 lines

  1. {
  2.      File:        ADSPSecure.p
  3.  
  4.      Contains:    Secure AppleTalk Data Stream Protocol Interfaces.
  5.  
  6.      Version:    Technology:    AOCE Toolbox 1.02
  7.                  Release:    Universal Interfaces 3.0d3 on Copland DR1
  8.  
  9.      Copyright:    © 1984-1996 by Apple Computer, Inc.  All rights reserved.
  10.  
  11.      Bugs?:        If you find a problem with this file, send the file and version
  12.                  information (from above) and the problem description to:
  13.  
  14.                      Internet:    apple.bugs@applelink.apple.com
  15.                      AppleLink:    APPLE.BUGS
  16.  
  17. }
  18. {$IFC UNDEFINED UsingIncludes}
  19. {$SETC UsingIncludes := 0}
  20. {$ENDC}
  21.  
  22. {$IFC NOT UsingIncludes}
  23.  UNIT ADSPSecure;
  24.  INTERFACE
  25. {$ENDC}
  26.  
  27. {$IFC UNDEFINED __ADSPSECURE__}
  28. {$SETC __ADSPSECURE__ := 1}
  29.  
  30. {$I+}
  31. {$SETC ADSPSecureIncludes := UsingIncludes}
  32. {$SETC UsingIncludes := 1}
  33.  
  34. {$IFC UNDEFINED __TYPES__}
  35. {$I Types.p}
  36. {$ENDC}
  37. {$IFC UNDEFINED __ADSP__}
  38. {$I ADSP.p}
  39. {$ENDC}
  40. {$IFC UNDEFINED __OCEAUTHDIR__}
  41. {$I OCEAuthDir.p}
  42. {$ENDC}
  43.  
  44. {$PUSH}
  45. {$ALIGN MAC68K}
  46. {$LibExport+}
  47.  
  48. {$IFC FOR_SYSTEM7_ONLY }
  49. {
  50.  New ADSP control codes
  51.  
  52.  * open a secure connection 
  53. }
  54.  
  55. CONST
  56.     sdspOpen                    = 229;
  57.  
  58. {
  59. For secure connections, the eom field of ioParams contains two single-bit flags
  60. (instead of a zero/non-zero byte). They are an encrypt flag (see below), and an
  61. eom flag.  All other bits in that field should be zero.
  62.  
  63. To write an encrypted message, you must set an encrypt bit in the eom field of
  64. the ioParams of your write call. Note: this flag is only checked on the first
  65. write of a message (the first write on a connection, or the first write following
  66. a write with eom set.
  67. }
  68.     dspEOMBit                    = 0;                            {  set if EOM at end of write  }
  69.     dspEncryptBit                = 1;                            {  set to encrypt message  }
  70.  
  71.     dspEOMMask                    = $01;
  72.     dspEncryptMask                = $02;
  73.  
  74. {
  75. Define an ADSPSecure parameter block, as used for the secure Open call.
  76.  
  77.  * size of ADSPSecure workspace 
  78. }
  79.     sdspWorkSize                = 2048;
  80.  
  81.  
  82. TYPE
  83.     TRSecureParamsPtr = ^TRSecureParams;
  84.     TRSecureParams = RECORD
  85.         localCID:                INTEGER;                                {  local connection id  }
  86.         remoteCID:                INTEGER;                                {  remote connection id  }
  87.         remoteAddress:            AddrBlock;                                {  address of remote end  }
  88.         filterAddress:            AddrBlock;                                {  address filter  }
  89.         sendSeq:                LONGINT;                                {  local send sequence number  }
  90.         sendWindow:                INTEGER;                                {  send window size  }
  91.         recvSeq:                LONGINT;                                {  receive sequence number  }
  92.         attnSendSeq:            LONGINT;                                {  attention send sequence number  }
  93.         attnRecvSeq:            LONGINT;                                {  attention receive sequence number  }
  94.         ocMode:                    SInt8;                                    {  open connection mode  }
  95.         ocInterval:                SInt8;                                    {  open connection request retry interval  }
  96.         ocMaximum:                SInt8;                                    {  open connection request retry maximum  }
  97.         secure:                    BOOLEAN;                                {   --> TRUE if session was authenticated  }
  98.         sessionKey:                AuthKeyPtr;                                {  <--> encryption key for session  }
  99.         credentialsSize:        LONGINT;                                {   --> length of credentials  }
  100.         credentials:            Ptr;                                    {   --> pointer to credentials  }
  101.         workspace:                Ptr;                                    {   --> pointer to workspace for connection align on even boundary and length = sdspWorkSize  }
  102.         recipient:                AuthIdentity;                            {   --> identity of recipient (or initiator if active mode  }
  103.         issueTime:                UTCTime;                                {   --> when credentials were issued  }
  104.         expiry:                    UTCTime;                                {   --> when credentials expiry  }
  105.         initiator:                RecordIDPtr;                            {  <--  RecordID of initiator returned here. Must give appropriate Buffer to hold RecordID (Only for passive or accept mode)  }
  106.         hasIntermediary:        BOOLEAN;                                {  <--  will be set if credentials has an intermediary  }
  107.         filler1:                BOOLEAN;
  108.         intermediary:            RecordIDPtr;                            {  <--  RecordID of intermediary returned here. (If intermediary is found in credentials Must give appropriate Buffer to hold RecordID (Only for passive or accept mode)  }
  109.     END;
  110.  
  111. {$ENDC}
  112. {$ALIGN RESET}
  113. {$POP}
  114.  
  115. {$SETC UsingIncludes := ADSPSecureIncludes}
  116.  
  117. {$ENDC} {__ADSPSECURE__}
  118.  
  119. {$IFC NOT UsingIncludes}
  120.  END.
  121. {$ENDC}
  122.